<%= render :partial => 'left_bar', :locals => { :on => 1 } %>

<div id="main">
  <div class="box">
    <form class="border p10 th" action="/admin/admin_users" method="get">
      <label>编号：
        <input type="text" name="id" value="<%= params[:id] %>"/>
      </label>
      &nbsp;&nbsp;
      <label>名字：
        <input type="text" name="user_name" value="<%= params[:user_name] %>"/>
      </label>
      &nbsp;&nbsp;
      <label>邮箱：
        <input type="text" name="email" value="<%= params[:email] %>"/>
      </label>
      &nbsp;&nbsp;
      <input class="submit btt90" type="submit" value="查询" />
    </form>
  </div>

  <div class="box">
    <table width="96%" class="table border">
      <tr>
        <th width="30"></th>
        <th>编号</th>
        <th>名字</th>
        <th>真名</th>
        <th>邮箱</th>
        <th>状态</th>
        <th width="120">创建时间</th>
        <th width="120">修改时间</th>
      </tr>
      <% for admin_user in @admin_users -%>
        <tr class="<%= cycle('', 'tr2') %>">
          <td><%= link_to '删除', [:admin, admin_user], :confirm => '你确定要删除吗？', :method => :delete %></td>
          <td><%= admin_user.id %></td>
          <td><%= link_to admin_user, edit_admin_admin_user_path(admin_user) %></td>
          <td><%= admin_user.real_name %></td>
          <td><%= admin_user.email %></td>
          <td><%= admin_user.status %></td>
          <td><%= admin_user.created_at %></td>
          <td><%= admin_user.updated_at %></td>
        </tr>
      <% end -%>
    </table>
  </div>
  <%= will_paginate @admin_users -%>
</div>
